<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_supplier.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_supplier.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '供应商管理',
                    name: 'Mall_supplier',
                    url: "/Suppliers/",
                    sortName: "createDate"
                },
                extend: extend,
                 editFormFields: {"supplierName":"","supplierName1":"","appSecret":"","supplierCode":"","roleId":"","supplierType":"","supplierPhone":"","supplierAddress":"","supplierUrl":"","appKey":"","isSendMessages":"","isAvailable":"","modifyDate":"","createDate":"","modifyID":"","createID":"","modifier":"","creator":"",},
                editFormOptions: [
                                [{"title":"供应商名称","field":"supplierName","type":"text"},
                                {"title":"供应商编码","field":"supplierCode","type":"text",hidden:true}],
                                [//{"title":"分销商权限","required":true,"field":"roleId","type":"select","dataKey": "mall_Distributor"},
                                {"title":"Appkey","required":true,"field":"appKey","type":"text"},
                                {"title":"供应商简称","field":"supplierName1","type":"text"}],
                                [{"title":"供应商手机","required":true,"field":"supplierPhone","type":"phone"},
                                {"title":"供应商地址","field":"supplierAddress","type":"text"}],
                                [{"title":"缺省Url","field":"supplierUrl","type":"text"},
                                {"title":"AppSecret","required":true,"field":"appSecret","type":"text"}],
                                [{"title":"是否发送短信","required":true,"field":"isSendMessages","type":"switch"},
                                {"title":"是否可用","required":true,"field":"isAvailable","type":"switch"}]
                                ],
                searchFormFields: {"supplierCode":"","supplierName":"","supplierName1":"","supplierCode":"","isAvailable":"","creator":"","createDate":"","modifyDate":""},
                searchFormOptions: [[{"title":"供应商名称","field":"supplierName","type":"like"},{"title":"供应商简称","field":"supplierName1","type":"like"},{ "title": "创建时间", "field": "createDate", "type": "datetime" },],[{"title":"分销商权限","field":"roleId","type":"select","dataKey": "mall_Distributor"},{ "dataKey": "enable", "data": [], "title": "是否可用", "field": "isAvailable", "type": "select" },
                ]],
                columns: [{field:'id',title:'主键',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'supplierName',title:'供应商名称',type:'string',width:180,align:'left',sortable:true},
                       {field:'supplierName1',title:'供应商简称',type:'string',width:180,align:'left'},
                       {field:'supplierPhone',title:'供应商手机',type:'string',width:120,align:'left'},
                       {field:'supplierAddress',title:'供应商地址',type:'string',width:180,align:'left'},
                       {field:'supplierUrl',title:'缺省Url',type:'string',width:120,align:'left'},
                       {field:'appKey',title:'Appkey',type:'string',width:120,align:'left'},
                       {field:'appSecret',title:'AppSecret',type:'string',width:120,align:'left'},
                       //{field:'isDelete',title:'是否删除',type:'int',width:120,require:true,align:'left'},
                       //{field:'roleId',title:'分销商权限',type:'int',width:120,align:'left'},
                       {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'int',width:90,align:'left'},
                       {field:'isSendMessages',title:'是否发送短信',bind: { key: 'enable', data: [] },type:'int',width:120,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
                      // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
                      // {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,align:'left'},
                    //    {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare13',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare14',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare15',title:'扩展字段1',type:'string',width:220,align:'left'},
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
